<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <form class="form-horizontal"  role="form" id="update_form" >
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="groupName" class="col-sm-3 control-label">群组名称</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="groupName" name="groupName" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentCode" class="col-sm-3 control-label">所属客户</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="rentCode" name="rentCode" >
                                    </select>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        ajaxs('./DUser/' + $('#id').val(), 'GET', null, true, function (data) {
            $("#groupName").val(data.groupName);
            ajaxs('./DRent/getRentKeyValue', 'GET', null, true, function (typedata) {
                for (var i = 0; i < typedata.length; i++) {
                    $("#rentCode").append("<option value=" + typedata[i].key + ">" + typedata[i].value + "</option>")
                }
            });
        });
    });
    function form_sub() {
        ajaxs('./DGroup', 'PUT',$("#update_form").serialize(), true, function(data){
            $("#im_unique_dlg").modal('hide');
            layer.msg(data.message);
            $("#rentTable table").bootstrapTable('refresh');
        });
    }
</script>